#include <stdio.h>

int main() {
    int year;
    int month;
    int day;
    int sum = 0;
    int flag = 0;
    for (year = 2023; year <= 2050; year++) {
        for (month = 3; month <= 12; month++) {
            int daysInMonth;
            if (month == 4 || month == 6 || month == 9 || month == 11) {
                daysInMonth = 30;
            } else if (month == 2) {
                if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
                    daysInMonth = 29;
                } else {
                    daysInMonth = 28;
                }
            } else {
                daysInMonth = 31;
            }
            for (day = 1; day <= daysInMonth; day++) {
                sum++;
                if (year == 2023 && month == 5 && day == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag) {
                break;
            }
        }
        if (flag) {
            break;
        }
    }
    printf("%d\n", sum);
    return 0;
}
